var TransformTool = require("./TransformTool.js");
var DOMControl = require("./DOMControl.js");

function DOMTransformTool(container){
	DOMTransformTool.prototype._super.call(this, container);
}

DOMTransformTool.prototype = new TransformTool();
DOMTransformTool.prototype._super = TransformTool;
DOMTransformTool.prototype.constructor = DOMTransformTool;

DOMTransformTool.prototype.setControls = function(controls){
	// remove old, persistent svg elements
	if (this.controls){
		var i = 0;
		var n = this.controls.length;
		for (i=0; i<n; i++){
			this.controls[i].undraw(this.container);
		}
	}
	
	DOMTransformTool.prototype._super.prototype.setControls.call(this, controls);
};

DOMTransformTool.prototype.shouldDraw = function(){
	// always draws since dom elements persistent
	return true;
};

exports = module.exports = DOMTransformTool;
